package cj.web.marry.dao;
/*
 *  
 *  
*/
import java.util.List;
import java.util.Map;

import net.paoding.rose.jade.annotation.DAO;
import net.paoding.rose.jade.annotation.ReturnGeneratedKeys;
import net.paoding.rose.jade.annotation.SQL;

/**
 * 
 * @author 
 *
 */
@DAO
public interface UserApplicationDAO{
	
	@SQL("select * from UserApplication where openid=:1")
    List<Map> queryByOpenId(String openid);
	
	@SQL("select * from UserApplication where nickname=:1")
    List<Map> queryByNickname(String nickname);
    
    @ReturnGeneratedKeys
    @SQL("INSERT INTO UserApplication (id,openid,nickname,sex,city,province,country,headimgurl,createDate) VALUES (:1,:2,:3,:4,:5,:6,:7,:8,now())")
    public int create(int id,String openid,String nickname,String sex,String city,String province,String country,String headimgurl);
}